<?php
    
    require('db_connection.php');
    $query = "SELECT * FROM tbllibrary";
    $result = mysql_query($query);
    $num = 1;
    $libctr= mysql_num_rows($result);
?>
<!doctype html public "-//W3C//DTD HTML 4.01//EN">


<html>

   <head>
      <title>La Union Online Library System -- Home</title>
      <meta http-equiv='generator' content='PHP Designer 2005' />
      <style type="text/css">
        @import url(style.css);
      </style>
   </head>
   <body>
   
    <script LANGUAGE=javascript>
    <!--
     function check()
     {
        if(document.search_form.searchtext.value=="" )
        {
          alert('Please fill the search box.');
          return false;
        }
        return true;
     }
     //-->
    </script>
        <table  width='80%' align='center' cellspacing='0' cellpadding='0'>
            <tr ><td class='outerframe'>
                <table width='100%'>
                <tr>
                    <td width='100%' colspan='2'>
                    <img src ='images/banner.jpg'></td></tr>
                <tr>
                    <td colspan='3' class='login' ><?php require('loginout.php'); ?></td></tr>
                <tr>
                    <td width='20%' class='menu' valign='top' ><?php require('menu.php'); ?></td>
                    <td class='content' width='80%' background ='images/background.jpg' valign='top'>
                        <p class='titles' align='top'>Search</p>
                        <form name='search_form' method='get' action='result.php' onSubmit="return check();" >
                        <table >
                            <tr><td>Search by:</td>
                                <td><select name='category' ><option value='all'>All
                                            <option value='title'>Title
                                            <option value='author'>Author
                                            <option value='subject'>Subject
                                            <option value='description'>Keyword</select></td>
                                <td><input name='searchtext'/> </td>
                                <td>Found in:</td>
                                <td>
                                    <select name='location'>
                                    <option value='all'>All
                                    <?php  while ($row = mysql_fetch_array($result))
                                    {
                                        $libraryNo = $row['libraryNo'];
                                        $location = $row['libraryName'];
                                        echo"<option value=$libraryNo>"." $location "." ";
                                    } ?>
                                    </select>
                                </td>
                                <td><input type='submit' value='SEARCH' class='tool'></td>
                                
                                </tr></table>

                                <table cellpadding='10'><tr><td>  </td></tr></table>
                                <table  cellpadding='0'>
                                <tr ><td colspan='2'  class='homepage' width='100%'></td></tr>
                                <tr ><td  width='60%' valign='top'>
                                <p class='titles'> The La Union Online Library System</p>
                                <p class='homecontent'>La Union Online Library System (LOLS) is an integrated web-based library system that serves as a repository of the bibliographic information about the information resources available in the public libraries in the province. </p>
<p class='homecontent'>LOLS aims to provide an online public access catalog (OPAC) to the library users and promote the use of books and information.</p></td>
                                <td valign='top'>
                                    <br>
                                    <div id="T1" style="border:2px solid #FC792A;height:40;width:300">
                                    <?php require('news.php'); ?> </div><br>
                                    <div id="T1" style="border:2px solid #FC792A;height:40;width:300">
                                    <?php require('newarrivals.php'); ?></div></td></tr>
                        </table></td></tr>
                
                <tr><td colspan='2' class='outerframe2'><?php require('contact.php'); ?></td></tr>
                </table>
        </td></tr></table>
    </body>
</html>
<?php
require('expire.php');
?>

